/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package xmluebung2;

import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JFrame;

/**
 * Creates a standard JFrame.
 * 
 * @author Adrian Cieluch
 */
public class Frame extends JFrame {
    
    /**
     * Frame Constructor.
     * 
     * @param title     title of the frame
     * @param width     width of the frame
     * @param height    height of the frame 
     */
    public Frame(String title, int width, int height) {
        this.setTitle(title);
        this.setSize(width, height);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        
        //Icon
        Image icon = new ImageIcon(getClass().getResource("icons/icon.png")).getImage();
        this.setIconImage(icon);
        
        this.setVisible(true);
        this.setResizable(false);
    }
}
